package jw.guli.cmsservice.controller;


import jw.guli.cmsservice.entity.CrmBanner;
import jw.guli.cmsservice.service.CrmBannerService;
import jw.guli.commonutils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author jiangw
 * @since 2021-02-07
 */
@RestController
@RequestMapping("/cmsservice/bannerfront")
@CrossOrigin
public class BanneFrontController {
    @Autowired
    private CrmBannerService bannerService;

    //查询所有banner
    @GetMapping("getAllBanner")
    public R getAllBanner() {
        List<CrmBanner> list = bannerService.selectAllBanner();
        return R.ok().data("list",list);
    }
}

